Optimal. Leaf size=280 \[ -\frac {2 f^2 \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^3 \sqrt {a^2-b^2}}+\frac {2 f^2 \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b d^3 \sqrt {a^2-b^2}}-\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^2 \sqrt {a^2-b^2}}+\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d^2 \sqrt {a^2-b^2}}-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.53, antiderivative size = 280, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {4422, 3323, 2264, 2190, 2279, 2391} \[ -\frac {2 f^2 \text {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^3 \sqrt {a^2-b^2}}+\frac {2 f^2 \text {PolyLog}\left (2,\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d^3 \sqrt {a^2-b^2}}-\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^2 \sqrt {a^2-b^2}}+\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d^2 \sqrt {a^2-b^2}}-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2264
Rule 2279
Rule 2391
Rule 3323
Rule 4422
Rubi steps
\begin {align*} \int \frac {(e+f x)^2 \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx &=-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}+\frac {(2 f) \int \frac {e+f x}{a+b \sin (c+d x)} \, dx}{b d}\\ &=-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}+\frac {(4 f) \int \frac {e^{i (c+d x)} (e+f x)}{i b+2 a e^{i (c+d x)}-i b e^{2 i (c+d x)}} \, dx}{b d}\\ &=-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}-\frac {(4 i f) \int \frac {e^{i (c+d x)} (e+f x)}{2 a-2 \sqrt {a^2-b^2}-2 i b e^{i (c+d x)}} \, dx}{\sqrt {a^2-b^2} d}+\frac {(4 i f) \int \frac {e^{i (c+d x)} (e+f x)}{2 a+2 \sqrt {a^2-b^2}-2 i b e^{i (c+d x)}} \, dx}{\sqrt {a^2-b^2} d}\\ &=-\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}+\frac {\left (2 i f^2\right ) \int \log \left (1-\frac {2 i b e^{i (c+d x)}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{b \sqrt {a^2-b^2} d^2}-\frac {\left (2 i f^2\right ) \int \log \left (1-\frac {2 i b e^{i (c+d x)}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{b \sqrt {a^2-b^2} d^2}\\ &=-\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}+\frac {\left (2 f^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (1-\frac {2 i b x}{2 a-2 \sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i (c+d x)}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {\left (2 f^2\right ) \operatorname {Subst}\left (\int \frac {\log \left (1-\frac {2 i b x}{2 a+2 \sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i (c+d x)}\right )}{b \sqrt {a^2-b^2} d^3}\\ &=-\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}+\frac {2 i f (e+f x) \log \left (1-\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {2 f^2 \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}+\frac {2 f^2 \text {Li}_2\left (\frac {i b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^3}-\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 3.21, size = 311, normalized size = 1.11 \[ -\frac {(e+f x)^2}{b d (a+b \sin (c+d x))}+\frac {2 i f \left (-i d \left (2 e \sqrt {b^2-a^2} \tan ^{-1}\left (\frac {i a+b e^{i (c+d x)}}{\sqrt {a^2-b^2}}\right )+f x \sqrt {a^2-b^2} \left (\log \left (1-\frac {b e^{i (c+d x)}}{\sqrt {b^2-a^2}-i a}\right )-\log \left (1+\frac {b e^{i (c+d x)}}{\sqrt {b^2-a^2}+i a}\right )\right )\right )-f \sqrt {a^2-b^2} \text {Li}_2\left (\frac {b e^{i (c+d x)}}{\sqrt {b^2-a^2}-i a}\right )+f \sqrt {a^2-b^2} \text {Li}_2\left (-\frac {b e^{i (c+d x)}}{i a+\sqrt {b^2-a^2}}\right )\right )}{b d^3 \sqrt {-\left (a^2-b^2\right )^2}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.73, size = 1401, normalized size = 5.00 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (f x + e\right )}^{2} \cos \left (d x + c\right )}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.48, size = 606, normalized size = 2.16 \[ -\frac {2 i \left (f^{2} x^{2}+2 f e x +e^{2}\right ) {\mathrm e}^{i \left (d x +c \right )}}{b d \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right )}+\frac {4 i f e \arctan \left (\frac {2 i b \,{\mathrm e}^{i \left (d x +c \right )}-2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{d^{2} b \sqrt {-a^{2}+b^{2}}}+\frac {2 f^{2} \ln \left (\frac {i a +b \,{\mathrm e}^{i \left (d x +c \right )}-\sqrt {-a^{2}+b^{2}}}{i a -\sqrt {-a^{2}+b^{2}}}\right ) x}{d^{2} b \sqrt {-a^{2}+b^{2}}}+\frac {2 f^{2} \ln \left (\frac {i a +b \,{\mathrm e}^{i \left (d x +c \right )}-\sqrt {-a^{2}+b^{2}}}{i a -\sqrt {-a^{2}+b^{2}}}\right ) c}{d^{3} b \sqrt {-a^{2}+b^{2}}}-\frac {2 f^{2} \ln \left (\frac {i a +b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {-a^{2}+b^{2}}}{i a +\sqrt {-a^{2}+b^{2}}}\right ) x}{d^{2} b \sqrt {-a^{2}+b^{2}}}-\frac {2 f^{2} \ln \left (\frac {i a +b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {-a^{2}+b^{2}}}{i a +\sqrt {-a^{2}+b^{2}}}\right ) c}{d^{3} b \sqrt {-a^{2}+b^{2}}}-\frac {2 i f^{2} \dilog \left (\frac {i a +b \,{\mathrm e}^{i \left (d x +c \right )}-\sqrt {-a^{2}+b^{2}}}{i a -\sqrt {-a^{2}+b^{2}}}\right )}{d^{3} b \sqrt {-a^{2}+b^{2}}}+\frac {2 i f^{2} \dilog \left (\frac {i a +b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {-a^{2}+b^{2}}}{i a +\sqrt {-a^{2}+b^{2}}}\right )}{d^{3} b \sqrt {-a^{2}+b^{2}}}-\frac {4 i f^{2} c \arctan \left (\frac {2 i b \,{\mathrm e}^{i \left (d x +c \right )}-2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{d^{3} b \sqrt {-a^{2}+b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F(-1)] time = 0.00, size = -1, normalized size = -0.00 \[ \text {Hanged} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________